/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$(document).ready(function(e){
    if($(window).width()<=623){
        $(".btn_waze_01 ul li").css({"display":"none"});
        if(isMobile.any()=="Android"){
                 $(".btn_waze_01 ul li.two").css({"display":"block", "margin-top":"25px"});
                 $(".btn_waze_01 .btn_waze_01_left ul.links").css({"width": "110px","float": "left"});
                 $(".btn_waze_01 div.pictures").css({"width":"180px"});
            }else{
                if(isMobile.any()=="iPhone" || isMobile.any()=="iPad" || isMobile.any()=="iPod"){
                    $(".btn_waze_01 ul li.one").css({"display":"block", "margin-top":"25px"});
                    $(".btn_waze_01 .btn_waze_01_left ul.links").css({"width": "110px","float": "left"});
                    $(".btn_waze_01 div.pictures").css({"width":"180px"});
                }else{
                    if(isMobile.any()=="BlackBerry"){
                        $(".btn_waze_01 ul li.three").css({"display":"block", "margin-top":"25px"});
                        $(".btn_waze_01 .btn_waze_01_left ul.links").css({"width": "110px","float": "left"});
                        $(".btn_waze_01 div.pictures").css({"width":"180px"});
                    }else{
                        if(isMobile.any()=="Symbian"){
                            $(".btn_waze_01 ul li.four").css({"display":"block", "margin-top":"25px"});
                            $(".btn_waze_01 .btn_waze_01_left ul.links").css({"width": "110px","float": "left"});
                            $(".btn_waze_01 div.pictures").css({"width":"180px"});
                        }
                        else{
                            $(".btn_waze_01 ul li").css({"display":"block", "margin-top":"0"});
                            $(".btn_waze_01 .btn_waze_01_left ul.links").css({"width": "auto","float": "none"});
                            $(".btn_waze_01 div.pictures").css({"width":"274px"});
                        }
                    }
                }
            }
    }
    
    $(window).resize(function(){
        if($(window).width()<=623){
            $(".btn_waze_01 ul li").css({"display":"none"});
            if(isMobile.any()=="Android"){
                 $(".btn_waze_01 ul li.two").css({"display":"block", "margin-top":"25px"});
                 $(".btn_waze_01 .btn_waze_01_left ul.links").css({"width": "110px","float": "left"});
                 $(".btn_waze_01 div.pictures").css({"width":"180px"});
            }else{
                if(isMobile.any()=="iPhone" || isMobile.any()=="iPad" || isMobile.any()=="iPod"){
                    $(".btn_waze_01 ul li.one").css({"display":"block", "margin-top":"25px"});
                    $(".btn_waze_01 .btn_waze_01_left ul.links").css({"width": "110px","float": "left"});
                    $(".btn_waze_01 div.pictures").css({"width":"180px"});
                }else{
                    if(isMobile.any()=="BlackBerry"){
                        $(".btn_waze_01 ul li.three").css({"display":"block", "margin-top":"25px"});
                        $(".btn_waze_01 .btn_waze_01_left ul.links").css({"width": "110px","float": "left"});
                        $(".btn_waze_01 div.pictures").css({"width":"180px"});
                    }else{
                        if(isMobile.any()=="Symbian"){
                            $(".btn_waze_01 ul li.four").css({"display":"block", "margin-top":"25px"});
                            $(".btn_waze_01 .btn_waze_01_left ul.links").css({"width": "110px","float": "left"});
                            $(".btn_waze_01 div.pictures").css({"width":"180px"});
                        }
                        else{
                            $(".btn_waze_01 ul li").css({"display":"block", "margin-top":"0"});
                            $(".btn_waze_01 .btn_waze_01_left ul.links").css({"width": "auto","float": "none"});
                            $(".btn_waze_01 div.pictures").css({"width":"274px"});
                        }
                    }
                }
            }
        }
        else{
            $(".btn_waze_01 ul li").css({"display":"block","margin-top":"0"});
            $(".btn_waze_01 .btn_waze_01_left ul.links").css({"width": "auto","float": "none"});
            $(".btn_waze_01 div.pictures").css({"width":"100%"});
        }
    })
    
    
});


var isMobile = {
    Android: function() {
        return navigator.userAgent.match(/Android/i);
    },
    BlackBerry: function() {
        return navigator.userAgent.match(/BlackBerry/i);
    },
    iOS: function() {
        return navigator.userAgent.match(/iPhone|iPad|iPod/i);
    },
    Opera: function() {
        return navigator.userAgent.match(/Opera Mini/i);
    },
    Windows: function() {
        return navigator.userAgent.match(/IEMobile/i);
    },
    any: function() {
        return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
    }
};